﻿using System;
using System.Windows.Forms;
using BlueDot.Mobile.Core;

namespace KeyboardInput.Views
{
    public partial class MainShell : Shell
    {
        #region Constructors

        public MainShell()
        {
            InitializeComponent();
        }

        #endregion

        #region public

        public void OnKeyDown(object sender, KeyEventArgs e)
        {
            Application.Actions[ApplicationActions.KeyboardInput].Fire(this, e);
        }

        /// <summary>
        /// Receives a notification when any view is shown
        /// </summary>
        [Receiver(WellKnownActions.ViewShown)]
        public void ViewShownAction(object sender, EventArgs e)
        {
            Focus();
        }

        #endregion
    }
}